<template>
 <div class="my">
   <common-nav></common-nav>
   <div class="standard-container">
     <my-index :skinValue="skinValue"></my-index>
   </div>
 </div>
</template>

<script lang="ts">

  import Vue from 'vue'
  import Component from 'vue-class-component'
  import CommonNav from '../../components/common/common-nav'
  import MyIndex from '../../components/my/index'
  import {State} from "vuex-class";
  import {Actions, Store} from "../../enums/Store";
  import {SkinInterface} from "../../interfaces/PageInterface";
  @Component({
    components:{
      CommonNav,
      MyIndex
    }
  })

  export default class My extends Vue {
    @State(Store.Skin) skinValue:SkinInterface[Store.Skin]

     private created(){
        if(process.browser){
          if(localStorage.getItem('themesBg')){
            this.$store.dispatch(Actions.GetSkin,localStorage.getItem('themesBg'))
          }else{
            this.$store.dispatch(Actions.GetSkin,'0')
          }
        }
      }
  }
</script>
<style lang="scss">
 @include component(my){
   min-height: 100vh;
 }
</style>
